<?php

if(!isset($_SESSION))
{
  session_start();
}

/* If $_SESSION['email'] exists, that means the user is logged in.  If the user
   isn't logged in, what are they doing here!?  OMG.  Send them back to the home
   page or something. */
if(!isset($_SESSION['email']))
{
  header('Location: ../index.php'); 
}
else
{
  /* Unset the $_SESSION['email'] variable effectively logging out the user */
  unset($_SESSION['email']);

  /* Send them back to the home page. */
  header('Location: ../index.php');
}

?>

